pub fn convert_base(num_str: &str, to_base: u32) -> String {
    // 解析原始数字和进制
    let parts: Vec<&str> = num_str.trim_end_matches(')').split('(').collect();
    let num = parts[0];
    let from_base = parts[1].parse::<u32>().unwrap();
    // 将原始数字转换为十进制
    let decimal = u32::from_str_radix(num, from_base).unwrap();
    if to_base == 10 {
        return decimal.to_string();
    }
    let mut result = Vec::new();
    let mut n = decimal;
    while n > 0 {
        let digit = n % to_base;
        let ch = if digit < 10 {
            (b'0' + digit as u8) as char
        } else {
            (b'a' + (digit - 10) as u8) as char
        };
        result.push(ch);
        n /= to_base;
    }
    if result.is_empty() {
        return "0".to_string();
    }
    result.reverse();
    result.into_iter().collect()
}
